void user_adc_init();
u16 get_adc();

void print_adc();

void motor_mcpwm_init();

void set_motor_pwm(int speed);

void run_motor(u16 step, u8 direction);

void set_motor_step(u16 angle);

int calculatePID(double input);

void set_angle_pid(double dest_angle);

void set_angle(u16 dest_angle);

double map_to_range(double num, double old_range, double old_max, double new_range, double new_max);


